//
//  UIView+Capture.m
//  HsCommonModule
//
//  Created by Kun on 13/06/2017.
//  Copyright © 2017 hundsun. All rights reserved.
//

#import "UIView+Capture.h"

@implementation UIView (Capture)

- (UIImage*)screenShotImage
{
    UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0.0);
    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

@end
